package com.oj.common.core.enums;

import lombok.Data;
import lombok.Getter;

/**
 * @Description
 * @Author bin
 * @Date 2025/4/3
 */
@Getter
public enum ResultCode {

    SUCCESS(1000,"操作成功"),

    ERROR(2000,"服务器繁忙,请稍后重试"),

    FAILURE(3000,"操作失败"),

    FAILED_UNAUTHORIZED(3001,"未授权"),

    FAILED_PARAMS_VALIDATE(3002,"参数校验失败"),

    FAILED_NOT_EXISTS(3003,"资源不存在"),

    FAILED_ALREADY_EXISTS(3004,"资源已存在"),

    FAILED_USER_EXISTS(3101,"用户已存在"),

    FAILED_USER_NOT_EXISTS(3102,"用户不存在"),

    FAILED_LOGIN(3103,"用户名或密码错误"),

    FAILED_USER_BANNED(3104,"您已被列⼊黑名单,请联系管理员"),

    FAILED_USER_PHONE_NOT_VALIDATE(3105,"手机号无效"),

    FAILED_USER_FREQUENTLY(3106,"用户操作过于频繁"),

    FAILED_USER_TIMELIMIT(3107,"次数超过限制"),

    FAILED_USER_SEND_FAILED(3108,"发送验证码失败"),

    FAILED_INVALID_CODE(3109,"验证码无效"),

    FAILED_ERROR_CODE(3110,"验证码错误"),

    EXAM_START_TIME_BEFORE_CURRENT_TIME(3201,"添加的竞赛开始时间不能小于当前时间"),

    EXAM_START_TIME_AFTER_END_TIME(3202,"添加的竞赛开始时间不能大于竞赛结束时间"),

    EXAM_NOT_EXISTS(3203,"竞赛不存在"),

    EXAM_QUESTION_NOT_EXISTS(3204,"为竞赛新增的问题不存在"),

    EXAM_CANNOT_DELETE(3205,"该竞赛下有题目,请先删除该竞赛下的题目"),

    EXAM_CANNOT_OPERATE(3206,"该竞赛不可被操作"),

    EXAM_CANNOT_PUBLISH(3207,"该竞赛下没有题目,无法发布"),

    EXAM_HAS_PUBLISHED(3208,"该竞赛已被发布"),

    EXAM_NOT_PUBLISHED(3209,"该竞赛未被发布"),

    EXAM_IS_PUBLISHED(3210,"该竞赛已被发布, 不能被操作"),

    QUESTION_CANNOT_DELETE(3301,"该题目被竞赛关联,请先删除该竞赛下的题目"),

    USER_EXAM_HAS_ENTER(3301,"用户已经报过名了"),

    FAILED_FILE_UPLOAD(3401,"文件上传失败"),

    FAILED_FILE_UPLOAD_TIME_LIMIT(3402,"当天文件上传次数超限"),

    FAILED_FIRST_QUESTION(3501,"该题目为第一题"),

    FAILED_LAST_QUESTION(3502,"该题目为最后一题"),

    FAILED_NOT_SUPPORT_PROGRAM(3601,"不支持的编程语言"),

    FAILED_USER_SUBMIT(3602, "失败的答题结果查询"),

    DATA_INSERT_FAILED(4001,"数据插入失败"),

    DATA_UPDATE_FAILED(4002,"数据更新失败"),

    FAILED_RABBIT_PRODUCE(3701, "rabbit生产者生产消息异常");

    private Integer code;

    private String msg;

    ResultCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
